home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / fax / leffler / v2.1.0.patch-7 < prev    next >
Encoding:
Text File  |  1993-08-27  |  46.1 KB  |  1,563 lines

  1. #! /bin/sh
  2. # patch script for converting a41 to a45
  3. TOP=.
  4.  
  5. Patch()
  6. {
  7.     echo "Patch $1:"; patch -s $TOP/$1
  8. }
  9.  
  10. NewFile()
  11. {
  12.     echo "New file $1"; cat >$TOP/$1
  13. }
  14.  
  15. NewDir()
  16. {
  17.     echo "New directory $1"; mkdir $TOP/$1
  18. }
  19.  
  20. RmFile()
  21. {
  22.     echo "Remove $1"; rm -f $TOP/$1.orig; mv $TOP/$1 $TOP/$1.orig
  23. }
  24.  
  25. Patch README<<'EOF-EOF-EOF'
  26. 1c1
  27. < $Header: /usr/people/sam/fax/RCS/README,v 1.63 93/08/15 18:45:33 sam Exp $
  28. ---
  29. > $Header: /usr/people/sam/fax/RCS/README,v 1.65 93/08/27 13:02:42 sam Exp $
  30. 166,170c166,168
  31. < The system is written almost entirely in C++.  I use the AT&T 2.1
  32. < compiler, as supported by SGI.  I have had no luck building the code
  33. < under the AT&T 3.0 compiler (I tried but had to fallback to the 2.1
  34. < compiler).  GNU gcc 2.3.3 has been successfully used to build this
  35. < software on all systems.
  36. ---
  37. > The system is written almost entirely in C++.  I use the AT&T 2.1 and
  38. > 3.0 compilers, as supported by SGI.  GNU gcc 2.3.3 and later have been
  39. > successfully used to build this software on all systems.
  40. 239,240c237,238
  41. < versions may also work (and in fact may be required if you use a newer
  42. < version of gcc).
  43. ---
  44. > versions also work (and are usually required with newer versions of
  45. > gcc).
  46. 263,264c261,262
  47. < versions of awk.  If you encounter problems, in particular with the rts
  48. < (Return To Sender) shell script, try the GNU awk.
  49. ---
  50. > versions of awk.  If you encounter problems, in particular with the
  51. > notify or rts (Return To Sender) shell scripts, try the GNU awk.
  52. 300a299
  53. >     aix32    AIX 3.2.3 extended on a RS/6000 model 580 (incomplete)
  54. 302a302
  55. >     hpux    HP-UX 9.x on an HP 9000/700 (not yet ready)
  56. 313a314,315
  57. > Systems that are marked (not yet ready) are in preparation, but not
  58. > yet organized for distribution.
  59. 889c891
  60. < folks' work.  Robin Schaufler did much of the early work for delayed
  61. ---
  62. > folks' work.  Robin Schaufler did the original scheme for delayed
  63. EOF-EOF-EOF
  64. Patch configure<<'EOF-EOF-EOF'
  65. 2c2
  66. < #    $Header: /usr/people/sam/fax/RCS/configure,v 1.80 93/08/16 08:05:17 sam Exp $
  67. ---
  68. > #    $Header: /usr/people/sam/fax/RCS/configure,v 1.82 93/08/26 19:21:01 sam Exp $
  69. 96a97,98
  70. >     @rt)        TARGET=reno;;
  71. >     @AIX)       TARGET=aix32;;
  72. 159a162,169
  73. > reno|reno-gcc)
  74. >     TARGET=reno COMPILER=gcc
  75. >     warnUnfinished $TARGET
  76. >     ;;
  77. > aix32|aix32-gcc)
  78. >     TARGET=aix32 COMPILER=gcc
  79. >     warnUnfinished $TARGET
  80. >     ;;
  81. 358c368
  82. < 4.4bsd*)
  83. ---
  84. > reno*|4.4bsd*)
  85. 436c446
  86. < CheckDecl mkstemp stdio.h || echo 'extern int mkstemp(char *);'
  87. ---
  88. > CheckDecl mkstemp stdio.h unistd.h || echo 'extern int mkstemp(char *);'
  89. 471c481
  90. <     CheckDecl fchmod unistd.h libc.h osfcn.h ||
  91. ---
  92. >     CheckDecl fchmod unistd.h libc.h osfcn.h sys/stat.h ||
  93. EOF-EOF-EOF
  94. Patch distrules<<'EOF-EOF-EOF'
  95. 1c1
  96. < #    $Header: /usr/people/sam/fax/RCS/distrules,v 1.73 93/08/16 08:05:04 sam Exp $
  97. ---
  98. > #    $Header: /usr/people/sam/fax/RCS/distrules,v 1.74 93/08/27 14:02:22 sam Exp $
  99. 134a135,162
  100. > PORTAIXFILES=                    \
  101. >     port/aix32/Makefile                \
  102. >     port/aix32/Makefile.flexfax            \
  103. >     port/aix32/README                \
  104. >     port/aix32/defs.gcc                \
  105. >     port/aix32/install.sh            \
  106. >     port/aix32/strcasecmp.c            \
  107. >     port/aix32/vsyslog.c            \
  108. >     port/aix32/gcc-related/ctype.h        \
  109. >     port/aix32/gcc-related/dirent.h        \
  110. >     port/aix32/gcc-related/fcntl.h        \
  111. >     port/aix32/gcc-related/math.h        \
  112. >     port/aix32/gcc-related/netdb.h        \
  113. >     port/aix32/gcc-related/pwd.h        \
  114. >     port/aix32/gcc-related/setjmp.h        \
  115. >     port/aix32/gcc-related/signal.h        \
  116. >     port/aix32/gcc-related/stdio.h        \
  117. >     port/aix32/gcc-related/stdlib.h        \
  118. >     port/aix32/gcc-related/string.h        \
  119. >     port/aix32/gcc-related/termios.h        \
  120. >     port/aix32/gcc-related/time.h        \
  121. >     port/aix32/gcc-related/unistd.h        \
  122. >     port/aix32/gcc-related/sys/fcntl.h        \
  123. >     port/aix32/gcc-related/sys/select.h        \
  124. >     port/aix32/gcc-related/sys/stat.h        \
  125. >     port/aix32/gcc-related/sys/time.h        \
  126. >     port/aix32/gcc-related/sys/wait.h        \
  127. >     ${NULL}
  128. 149a178
  129. >     ${PORTAIXFILES}                \
  130. EOF-EOF-EOF
  131. Patch dist/flexfax.alpha<<'EOF-EOF-EOF'
  132. 1c1
  133. < define ALPHA 041
  134. ---
  135. > define ALPHA 045
  136. EOF-EOF-EOF
  137. Patch etc/config.rc32acl<<'EOF-EOF-EOF'
  138. 1c1
  139. < # $Header: /usr/people/sam/fax/etc/RCS/config.rc32acl,v 1.1 93/07/29 16:36:15 sam Exp $
  140. ---
  141. > # $Header: /usr/people/sam/fax/etc/RCS/config.rc32acl,v 1.2 93/08/24 10:16:45 sam Exp $
  142. 8,13c8,13
  143. < # This configuration file sets up the modem to run at 19.2 for
  144. < # sending and for receiving.  XON/XOFF flow control is used on
  145. < # the tty port.  RTS/CTS can be used by switching the flow control
  146. < # setup, but beware of modems that do not support it during
  147. < # facsimile operations.  Also beware that the adaptive-answer
  148. < # facility, when supported, is usually unreliable.
  149. ---
  150. > # This configuration file sets up the modem to run at 38.4 for
  151. > # sending and for receiving.  RTS/CTS is used for flow control
  152. > # which also works for data connections.  Adaptive answer support
  153. > # is reliable, but to use it you must also enable ModemWaitForConnect
  154. > # to force the server to skip intermediate status messages and
  155. > # wait for the "CONNECT" message.
  156. 30a31
  157. > ModemWaitForConnect:    yes        # wait for CONNECT on answer
  158. EOF-EOF-EOF
  159. Patch etc/faxaddmodem.sh<<'EOF-EOF-EOF'
  160. 2c2
  161. < #    $Header: /usr/people/sam/fax/etc/RCS/faxaddmodem.sh,v 1.62 93/08/12 08:44:44 sam Exp $
  162. ---
  163. > #    $Header: /usr/people/sam/fax/etc/RCS/faxaddmodem.sh,v 1.64 93/08/27 09:00:30 sam Exp $
  164. 423c423
  165. < hasYP=`ypcat services 2>/dev/null | tail -1'` 2>/dev/null
  166. ---
  167. > hasYP=`ypcat services 2>/dev/null | tail -1` 2>/dev/null
  168. 886c886,888
  169. < if stty -f >/dev/null 2>&1; then
  170. ---
  171. > # NB: AIX returns zero even though -f is not valid.
  172. > #
  173. > if [ $OS != "AIX" ] && stty -f >/dev/null 2>&1; then
  174. 915c917,918
  175. <     pat=`echo "$i"|sed -e 's/[*&$\\]/\\\\&/g'`    # escape regex metacharacters
  176. ---
  177. >     # NB: [*&\\$] must have the "$" last for AIX (yech)
  178. >     pat=`echo "$i"|sed -e 's/[*&\\$]/\\\\&/g'`    # escape regex metacharacters
  179. EOF-EOF-EOF
  180. Patch etc/faxd<<'EOF-EOF-EOF'
  181. 2c2
  182. < #    $Header: /usr/people/sam/fax/etc/RCS/faxd,v 1.9 93/04/19 07:52:33 sam Exp $
  183. ---
  184. > #    $Header: /usr/people/sam/fax/etc/RCS/faxd,v 1.11 93/08/22 14:43:26 sam Exp $
  185. EOF-EOF-EOF
  186. Patch etc/probemodem.sh<<'EOF-EOF-EOF'
  187. 2c2
  188. < #    $Header: /usr/people/sam/fax/etc/RCS/probemodem.sh,v 1.4 93/08/09 09:14:16 sam Exp $
  189. ---
  190. > #    $Header: /usr/people/sam/fax/etc/RCS/probemodem.sh,v 1.5 93/08/27 09:00:33 sam Exp $
  191. 231c231,233
  192. < if stty -f >/dev/null 2>&1; then
  193. ---
  194. > # NB: AIX returns zero even though -f is not valid.
  195. > #
  196. > if [ $OS != "AIX" ] && stty -f >/dev/null 2>&1; then
  197. 260c262,263
  198. <     pat=`echo "$i"|sed -e 's/[*&$\\]/\\\\&/g'`    # escape regex metacharacters
  199. ---
  200. >     # NB: [*&\\$] must have the "$" last for AIX (yech)
  201. >     pat=`echo "$i"|sed -e 's/[*&\\$]/\\\\&/g'`    # escape regex metacharacters
  202. EOF-EOF-EOF
  203. Patch faxcover/faxcover.ps<<'EOF-EOF-EOF'
  204. 7c7
  205. < %    $Header: /usr/people/sam/fax/faxcover/RCS/faxcover.ps,v 1.9 93/04/18 18:05:13 sam Exp $
  206. ---
  207. > %    $Header: /usr/people/sam/fax/faxcover/RCS/faxcover.ps,v 1.10 93/08/27 14:06:17 sam Exp $
  208. 303c303
  209. < y comments rule stringwidth pop { x y M S /y y 29 sub def } BreakIntoLines
  210. ---
  211. > comments rule stringwidth pop { x y M S /y y 29 sub def } BreakIntoLines
  212. EOF-EOF-EOF
  213. Patch faxd/Class2Send.c++<<'EOF-EOF-EOF'
  214. 1c1
  215. < /*    $Header: /usr/people/sam/fax/faxd/RCS/Class2Send.c++,v 1.58 93/08/16 08:21:04 sam Exp $
  216. ---
  217. > /*    $Header: /usr/people/sam/fax/faxd/RCS/Class2Send.c++,v 1.59 93/08/27 09:00:52 sam Exp $
  218. 42a43
  219. > again:
  220. 57,58c58,67
  221. <     if (strneq(rbuf, "CED", 3))        // hack for busted modems
  222. <         return (dialResponse());
  223. ---
  224. >     /*
  225. >      * RC32ACL-based modems return CED before +FCON;
  226. >      * so this is ignored.  We also skip some common
  227. >      * extended status messages that folks forget to
  228. >      * disable in the config file.
  229. >      */
  230. >     if (strneq(rbuf, "CED", 3))
  231. >         goto again;
  232. >     if (strneq(rbuf, "DIALING", 7) || strneq(rbuf, "RRING", 5))
  233. >         goto again;
  234. EOF-EOF-EOF
  235. Patch faxd/FaxPoll.c++<<'EOF-EOF-EOF'
  236. 1c1
  237. < /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxPoll.c++,v 1.9 93/03/26 10:15:01 sam Exp $
  238. ---
  239. > /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxPoll.c++,v 1.10 93/08/27 12:40:22 sam Exp $
  240. 39a40
  241. >     changeState(RECEIVING);
  242. 40a42
  243. >     okToRecv = TRUE;            // we request receive, so it's ok
  244. EOF-EOF-EOF
  245. Patch faxd/FaxRecv.c++<<'EOF-EOF-EOF'
  246. 1c1
  247. < /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxRecv.c++,v 1.53 93/06/22 18:21:46 sam Exp $
  248. ---
  249. > /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxRecv.c++,v 1.56 93/08/27 14:00:14 sam Exp $
  250. 24a25
  251. > #include <unistd.h>
  252. 49c50
  253. <     changeState(RECEIVING, 0);
  254. ---
  255. >     changeState(RECEIVING);
  256. EOF-EOF-EOF
  257. Patch faxd/FaxSend.c++<<'EOF-EOF-EOF'
  258. 1c1
  259. < /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxSend.c++,v 1.83 93/07/20 16:28:01 sam Exp $
  260. ---
  261. > /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxSend.c++,v 1.84 93/08/27 12:40:56 sam Exp $
  262. 286,289c286,289
  263. <     const char* cig = fax.files[i];
  264. <     if (*cig == '\0')
  265. <         cig = FAXNumber;
  266. <     traceStatus(FAXTRACE_PROTOCOL, "POLL with CIG \"%s\"", cig);
  267. ---
  268. >     fxStr cig = canonicalizePhoneNumber(fax.files[i]);
  269. >     if (cig == "")
  270. >         cig = canonicalizePhoneNumber(FAXNumber);
  271. >     traceStatus(FAXTRACE_PROTOCOL, "POLL with CIG \"%s\"", (char*) cig);
  272. EOF-EOF-EOF
  273. Patch faxd/FaxServer.c++<<'EOF-EOF-EOF'
  274. 1c1
  275. < /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxServer.c++,v 1.121 93/08/15 11:23:23 sam Exp $
  276. ---
  277. > /*    $Header: /usr/people/sam/fax/faxd/RCS/FaxServer.c++,v 1.122 93/08/27 12:25:39 sam Exp $
  278. 531a532
  279. > #ifndef AIXV3                        /* AIX is busted */
  280. 538a540
  281. > #endif
  282. EOF-EOF-EOF
  283. Patch faxd/faxServerApp.c++<<'EOF-EOF-EOF'
  284. 1c1
  285. < /*    $Header: /usr/people/sam/fax/faxd/RCS/faxServerApp.c++,v 1.120 93/08/16 08:19:57 sam Exp $
  286. ---
  287. > /*    $Header: /usr/people/sam/fax/faxd/RCS/faxServerApp.c++,v 1.121 93/08/27 16:41:01 sam Exp $
  288. 913a914,915
  289. >     // NB: use a temporary here to avoid gcc bug
  290. >     fxStr canon(server->canonicalizePhoneNumber(req.number));
  291. 919c921
  292. <     | quote | server->canonicalizePhoneNumber(req.number) | enquote
  293. ---
  294. >     | quote | canon | enquote
  295. EOF-EOF-EOF
  296. Patch man/faxcover.1<<'EOF-EOF-EOF'
  297. 1c1
  298. < .\"    $Header: /usr/people/sam/fax/man/RCS/faxcover.1,v 1.12 93/06/25 14:17:30 sam Exp $
  299. ---
  300. > .\"    $Header: /usr/people/sam/fax/man/RCS/faxcover.1,v 1.13 93/08/27 08:55:44 sam Exp $
  301. 163a164
  302. > .IR flexfax (1),
  303. EOF-EOF-EOF
  304. Patch port/386bsd/defs<<'EOF-EOF-EOF'
  305. 1c1
  306. < #    $Header: /usr/people/sam/fax/port/386bsd/RCS/defs,v 1.20 93/08/13 15:15:53 sam Exp $
  307. ---
  308. > #    $Header: /usr/people/sam/fax/port/386bsd/RCS/defs,v 1.21 93/08/17 11:29:24 sam Exp $
  309. 119c119
  310. < MACHDEPLIBS=-lg++ -liberty
  311. ---
  312. > MACHDEPLIBS=-lg++
  313. EOF-EOF-EOF
  314. Patch port/4.4bsd/defs<<'EOF-EOF-EOF'
  315. 1c1
  316. < #    $Header: /usr/people/sam/fax/port/4.4bsd/RCS/defs,v 1.5 93/08/13 15:16:07 sam Exp $
  317. ---
  318. > #    $Header: /usr/people/sam/fax/port/4.4bsd/RCS/defs,v 1.6 93/08/17 11:29:33 sam Exp $
  319. 117c117
  320. < MACHDEPLIBS=-lg++ -liberty
  321. ---
  322. > MACHDEPLIBS=-lg++
  323. EOF-EOF-EOF
  324. NewDir port/aix32
  325. NewFile port/aix32/Makefile<<'EOF-EOF-EOF'
  326. #! smake
  327. #    $Header: /usr/people/sam/fax/port/aix32/RCS/Makefile,v 1.1 93/08/26 19:28:37 sam Exp $
  328. #
  329. # FlexFAX Facsimile Software
  330. #
  331. # Copyright (c) 1993 Sam Leffler
  332. # Copyright (c) 1993 Silicon Graphics, Inc.
  333. # Permission to use, copy, modify, distribute, and sell this software and 
  334. # its documentation for any purpose is hereby granted without fee, provided
  335. # that (i) the above copyright notices and this permission notice appear in
  336. # all copies of the software and related documentation, and (ii) the names of
  337. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  338. # publicity relating to the software without the specific, prior written
  339. # permission of Sam Leffler and Silicon Graphics.
  340. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  341. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  342. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  343. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  344. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  345. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  346. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  347. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  348. # OF THIS SOFTWARE.
  349. #
  350. DEPTH=../..
  351. include ${DEPTH}/defs
  352.  
  353. CFILES=\
  354.     strcasecmp.c \
  355.     vsyslog.c \
  356.     ${NULL}
  357. TARGETS=${PORT}/libport.a
  358.  
  359. default all::
  360.     @${MAKE} targets
  361.  
  362. targets: $(TARGETS)
  363.  
  364. include ${COMMONRULES}
  365.  
  366. libport.a: ${OBJECTS}
  367.     @rm -f $@;
  368.     @echo "${AR} ${AROPTS} $@ ${OBJECTS}";\
  369.        ${AR} ${AROPTS} $@ ${OBJECTS} $(C++FILT)
  370.     ${RANLIB} $@
  371. ${PORT}/libport.a: libport.a
  372.  
  373. install:
  374. EOF-EOF-EOF
  375. NewFile port/aix32/Makefile.flexfax<<'EOF-EOF-EOF'
  376. #!smake
  377. #    $Header: /usr/people/sam/fax/port/aix32/RCS/Makefile.flexfax,v 1.1 93/08/26 19:28:39 sam Exp $
  378. #
  379. # FlexFAX Facsimile Software
  380. #
  381. # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993 Sam Leffler
  382. # Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
  383. # Permission to use, copy, modify, distribute, and sell this software and 
  384. # its documentation for any purpose is hereby granted without fee, provided
  385. # that (i) the above copyright notices and this permission notice appear in
  386. # all copies of the software and related documentation, and (ii) the names of
  387. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  388. # publicity relating to the software without the specific, prior written
  389. # permission of Sam Leffler and Silicon Graphics.
  390. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  391. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  392. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  393. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  394. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  395. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  396. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  397. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  398. # OF THIS SOFTWARE.
  399. #
  400. COMMONPREF=fax
  401. DEPTH=    .
  402.  
  403. include defs
  404.  
  405. DIRS=    \
  406.     ${PORT} \
  407.     iv \
  408.     util \
  409.     fax2ps \
  410.     faxalter \
  411.     faxcover \
  412.     faxd \
  413.     faxmail \
  414.     faxrm \
  415.     faxstat \
  416.     recvfax \
  417.     sendfax \
  418.     \
  419.     doc \
  420.     etc \
  421.     man \
  422.     ${NULL}
  423. OTHERDIRS=\
  424.     libtiff \
  425.     ${NULL}
  426.  
  427. .PATH: ${DIRS} ${OTHERDIRS}
  428.  
  429. TARGETS=flexfax
  430.  
  431. default all ${TARGETS}:
  432.     @${MAKE} -f ${MAKEFILE} dirs
  433.  
  434. include rules
  435.  
  436. dirs::
  437.     @for i in ${OTHERDIRS} ${DIRS}; do \
  438.         (${ECHO} "= "$$i; cd $$i; ${MAKE}); \
  439.     done
  440. depend::
  441.     @for i in ${DIRS}; do \
  442.         (${ECHO} "= "$$i; cd $$i; ${MAKE} depend); \
  443.     done
  444. clean::
  445.     @for i in ${OTHERDIRS} ${DIRS}; do \
  446.         (${ECHO} "= "$$i; cd $$i; ${MAKE} clean); \
  447.     done
  448. clobber::
  449.     @for i in ${OTHERDIRS} ${DIRS}; do \
  450.         (${ECHO} "= "$$i; cd $$i; ${MAKE} clobber); \
  451.     done
  452.  
  453. makeClientDirs::
  454.     ${INSTALL} -u bin -g sys -m 755 -idb flexfax.sw.client -dir \
  455.         ${BIN} ${LIBDATA} ${LIBEXEC}
  456. makeServerDirs::
  457.     ${INSTALL} -u bin -g sys -m 755 -idb flexfax.sw.server -dir ${USRETC}
  458.     ${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 755 \
  459.         -idb flexfax.sw.server -dir \
  460.         -F ${SPOOL} bin etc recvq sendq tmp info cinfo log status
  461.     ${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 700 \
  462.         -idb flexfax.sw.server -dir \
  463.         -F ${SPOOL} docq
  464. makeDirs: makeClientDirs makeServerDirs
  465.  
  466. makeDevices::
  467.     ${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 600 -fifo \
  468.         -idb flexfax.sw.server -F ${SPOOL} FIFO
  469.  
  470. install: makeDirs makeDevices
  471.     @for i in ${DIRS}; do \
  472.         (${ECHO} "= "$$i; cd $$i; ${MAKE} install); \
  473.     done
  474.  
  475. include distrules
  476. EOF-EOF-EOF
  477. NewFile port/aix32/README<<'EOF-EOF-EOF'
  478. This directory contains the files needed to port the FlexFax fax server to
  479. the IBM RISC System/6000.  The environment under which this port was made
  480. was:
  481.  
  482.     RISC System/6000 model 580
  483.     AIX 3.2.3 extended
  484.     gcc v2.4.5 with g++ libraries v2.3.1
  485.  
  486. This porting has not been tested completely so there may be bugs or
  487. ommisions on my part.  One particular bug which I have been unable
  488. to solve yet has to do with select() not blocking on a read of the FIFOs
  489. used by FlexFax.  This causes faxd to loop in the Dispatcher::waitFor()
  490. routine (in iv/Dispatch/dispatcher.c++) which, in turn, causes faxd to 
  491. consume alot of CPU time.  Also, it manifests itself as a bug in
  492. FaxServer::abortRequested() routine (in faxd/FaxServer.c++).  If anyone
  493. knows a fix for this problem, please let me know.
  494.  
  495. There are several directories under this port directory.  The
  496. gcc-related directory contains wrappers for system headers for use by gcc
  497. during comilation of C++ code.
  498.  
  499. Robert MacKinnon,    UNIX Support | Internet/Email: robmack@bsc.no
  500. Bergen Environmental Sciences and |             robmack at bergen
  501. Solution Centre,  Bergen,  NORWAY | Phone:          +47-5-544618
  502. EOF-EOF-EOF
  503. NewFile port/aix32/defs.gcc<<'EOF-EOF-EOF'
  504. #    $Header: /usr/people/sam/fax/port/aix32/RCS/defs.gcc,v 1.1 93/08/26 19:28:40 sam Exp $
  505. #
  506. # FlexFAX Facsimile Software
  507. #
  508. # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993 Sam Leffler
  509. # Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
  510. # Permission to use, copy, modify, distribute, and sell this software and 
  511. # its documentation for any purpose is hereby granted without fee, provided
  512. # that (i) the above copyright notices and this permission notice appear in
  513. # all copies of the software and related documentation, and (ii) the names of
  514. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  515. # publicity relating to the software without the specific, prior written
  516. # permission of Sam Leffler and Silicon Graphics.
  517. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  518. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  519. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  520. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  521. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  522. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  523. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  524. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  525. # OF THIS SOFTWARE.
  526. #
  527.  
  528. #
  529. # These definitions are for building the software on a
  530. # IBM RISC System/6000 under AIX v3.2.3 using gcc 2.4.5 and libg++2.3.1.
  531. #
  532. # TARGET:    aix32
  533. # COMPILER:    gcc
  534. #
  535. SHELL    = /bin/sh
  536. DESTDIR    = .
  537. NULL    =
  538. MAKEFILE= Makefile
  539.  
  540. #
  541. # Location of auxiliary stuff needed for Solaris2
  542. #
  543. PORT    = ${DEPTH}/port/aix32
  544. GENERIC    = ${DEPTH}/port/generic
  545. #
  546. # Basic tools used in the build process.
  547. #
  548. C++    = /usr/local/bin/gcc
  549. CC    = /usr/local/bin/gcc
  550.  
  551. # Need $LN for c++ Make dependancy rule.  Required for debugger.
  552. LN      = /bin/ln -s
  553. NAWK    = /usr/bin/nawk
  554. INSTALL    = ksh ${PORT}/install.sh
  555. MKDEPEND= ksh ${GENERIC}/mkdepend
  556. AR    = /usr/bin/ar
  557. RANLIB    = /bin/echo
  558. SED    = /usr/bin/sed
  559.  
  560. #
  561. # AR options for creating/updating an archive
  562. #
  563. AROPTS=    crs
  564.  
  565. #
  566. # Special options for lptops compilation (yech).
  567. #
  568.  
  569. #
  570. # We wants System V-style getty support.
  571. #
  572. SYSGETTY=GettySysV.c++
  573.  
  574. #
  575. # and we want System V-style UUCP lock support.
  576. #
  577. UUCP_LOCKDIR=/etc/locks
  578. UUCP_LOCKTYPE=0
  579. UUCP_LOCKMODE=0444
  580.  
  581. #
  582. # Location of Adobe Font Metrics for lptops.
  583. #
  584. AFMDIR=/usr/local/lib/afm
  585.  
  586. #
  587. # PostScript imager for server to use: either dps
  588. # for Display Postscriptor gs for Ghostscript.
  589. #
  590. PSIMAGER=gs
  591.  
  592. #
  593. # Mail program for sending notification messages.
  594. #
  595. FAX_MAILCMD=/usr/bin/mail
  596. SENDMAIL=/usr/sbin/sendmail
  597.  
  598. #
  599. # Default optimizer and prototype options
  600. #
  601. OPTIMIZER=-g
  602. PROTOTYPES=
  603. CVERSION= -D__ANSI_CPP__
  604. C++FILE= -x c++
  605.  
  606. #
  607. # Auxillary directories for munged system header files
  608. #
  609. AUXINCL= ${PORT}/gcc-related
  610.  
  611. # default definitions for programs--overide them as desired
  612. LIBS=    ${LIBUTIL} ${LIBTIFF} ${LIBIV}
  613. LLDLIBS=${LIBS} ${MACHDEPLIBS}
  614. #
  615. # Override this definition to eliminate shared library use.
  616. #
  617. SHDLIBC=-static
  618.  
  619. #
  620. # Libraries that may vary from machine to machine (especially if
  621. # you use GNU GCC instead of AT&T C++).
  622. #
  623. MACHDEPLIBS=${PORT}/libport.a -lg++ -liberty -lc -lbsd -lm
  624. #
  625. # You must have v3.0 or newer of the TIFF library.  If
  626. # you already have it installed, or if you have version 3.0
  627. # or newer of InterViews installed (which includes the TIFF
  628. # library), you can point these to those places.  Otherwise,
  629. # you can just use the code provided here.
  630. #
  631. TIFF=    ${DEPTH}/libtiff
  632. LIBTIFF=${TIFF}/libtiff.a
  633. #
  634. # If you already have InterViews 3.0 or newer installed,
  635. # define these to be something like:
  636. #
  637. #IV=    /usr/include
  638. #LIBIV=    /usr/lib/libIV.a
  639. # Otherwise you can just use the subset of classes used by
  640. # the fax software and collected here in a hacked-up library.
  641. #
  642. IV=    ${DEPTH}/iv
  643. LIBIV=    ${IV}/libivhack.a
  644. # random utility functions and classes
  645. UTIL=    ${DEPTH}/util
  646. LIBUTIL=${UTIL}/libfaxutil.a
  647.  
  648. #
  649. # Uid&Gid for installing server stuff.  Note that the server process
  650. # proper (/usr/etc/faxd or similar) must either run setuid root or
  651. # setuid uucp (i.e. fax and uucp must have the same uid).  This is
  652. # so that the fax server can participate in the UUCP locking scheme
  653. # and thereby implement tty line sharing (i.e. share the same line
  654. # and modem for both fax and data).
  655. #
  656. FAXUSER=uucp
  657. FAXGROUP=uucp
  658.  
  659. #
  660. # Directories where stuff gets placed:
  661. #
  662. # BIN        client-directed applications
  663. # LIBDATA    client-directed application library data files
  664. # LIBEXEC    client-directed application library executables
  665. # SPOOL        spooling area for servers
  666. # DOC        non-manual documentation
  667. # USRETC    place for servers (faxd & faxd.recv)
  668. #
  669. BIN=    /usr/local/bin
  670. LIBDATA=/usr/local/lib/fax
  671. LIBEXEC=/usr/local/lib/fax
  672. DOC=    /usr/local/lib/fax/doc
  673. USRETC=    /usr/local/etc
  674.  
  675. SPOOL=    /var/spool/fax
  676. #
  677. # Manual-related controls:
  678. #
  679. # MAN        head of manual tree
  680. # MANAPP    subdirectory for stuff in BIN
  681. # MANSYS    subdirectory for server & server-related apps
  682. # MANFILES    subdirectory for file format info 
  683. # PAGEDIRT    temp files to remove on clean/clobber
  684. #
  685. MAN    = /usr/man
  686.  
  687. MANAPPS    = man1
  688. MANSYS    = man1
  689. MANFILES= man4
  690.  
  691. NROFF    = /usr/bin/nroff
  692. COMPRESS= compress
  693.  
  694. MANCAPP    = ${CLIENTAPPS}
  695. MANCFILE= ${CLIENTFILES}
  696. MANSAPP    = ${SERVERAPPS}
  697. MANSFILE= ${SERVERFILES}
  698. PAGEDIRT=
  699.  
  700. # programs used during installation
  701. ECHO=    /bin/echo
  702. FTR=    /usr/sbin/ftr
  703. GREP=    /usr/bin/grep
  704. RM=    /bin/rm
  705. PWD=    /bin/pwd
  706.  
  707. #
  708. # Definitions used by common rules.
  709. #
  710. COMMONRULES=${DEPTH}/rules
  711. COMMONTARGS= clobber clean rmtargets depend incdepend
  712.  
  713. #
  714. # C compiler flags are composed of variable (set on the command line),
  715. # local (defined in the makefile), and global (defined in this file)
  716. # parts, in that order.  This ordering is used so that variable or
  717. # locally specified include directories are searched before the globally
  718. # specified ones.
  719. #
  720. CFLAGS=    ${CVERSION} ${VCFLAGS} ${LCFLAGS} ${GCFLAGS}
  721.  
  722. VCFLAGS=${VCDEFS} ${VCINCS} ${VCOPTS}
  723. LCFLAGS=${LCDEFS} ${LCINCS} ${LCOPTS}
  724. GCFLAGS=${GCDEFS} ${GCINCS} ${GCOPTS}
  725.  
  726. COPTS=    ${VCOPTS} ${LCOPTS} ${GCOPTS}
  727. CDEFS=    ${VCDEFS} ${LCDEFS} ${GCDEFS}
  728. CINCS=    ${VCINCS} ${LCINCS} ${GCINCS}
  729.  
  730. GCOPTS=${OPTIMIZER}
  731. GCDEFS= -DAIXV3 -DAIX
  732. GCINCS=    -I. -I${DEPTH} -I${GENERIC} -I${UTIL} -I${TIFF}
  733. #
  734. # C++ flags are decomposed using the same hierarchy as C flags.
  735. #
  736. C++FLAGS=${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS}
  737.  
  738. VC++FLAGS=${VC++DEFS} ${VC++INCS} ${VC++OPTS}
  739. LC++FLAGS=${LC++DEFS} ${LC++INCS} ${LC++OPTS}
  740. GC++FLAGS=${GC++DEFS} ${GC++INCS} ${GC++OPTS}
  741.  
  742. C++OPTS=${VC++OPTS} ${LC++OPTS} ${GC++OPTS}
  743. C++DEFS=${VC++DEFS} ${LC++DEFS} ${GC++DEFS}
  744. C++INCS=${VC++INCS} ${LC++INCS} ${GC++INCS}
  745.  
  746. GC++OPTS=${OPTIMIZER}
  747. GC++INCS=-I. -I${DEPTH} -I${GENERIC} -I${AUXINCL} -I${UTIL} -I${IV} -I${TIFF}
  748. GC++DEFS= -DAIXV3 -DAIX -D_PATH_GETTY=\"/usr/sbin/getty\" -DfxSIGHANDLER=int '-DfxSIGVECHANDLER=(void(*)())'
  749.  
  750. #
  751. # Loader flags, composed of library (-l's) and option parts, with
  752. # the libraries appearing last.  Both of these are divided into variable,
  753. # local, and global parts.  The composition of LDFLAGS is done in the
  754. # other "direction" from CFLAGS so that all the -L's, that are part of
  755. # LDOPTS, appear before any of the -l's, which are part of LDLIBS.
  756. # Another benefit of segregating the libraries from the remaining of the
  757. # loader options is that the libraries alone can easily be given to
  758. # another program, e.g., lint.
  759. #
  760. # Notes:
  761. #   - If a program should not be linked with the shared version of libc,
  762. #     then its make file should override the setting of SHDLIBC with a
  763. #     line such as "SHDLIBC=".
  764. #
  765. LDFLAGS=${LDOPTS} ${LDLIBS}
  766.  
  767. LDOPTS=${VLDOPTS} ${LLDOPTS} ${GLDOPTS}
  768. LDLIBS=${VLDLIBS} ${LLDLIBS} ${GLDLIBS}
  769.  
  770. GLDOPTS=
  771. GLDLIBS=${SHDLIBC}
  772.  
  773. #
  774. # Convenient command macros that include the flags macros.
  775. #
  776. C++F=    ${C++} ${C++FLAGS}
  777. C++CPP=    ${C++} -E ${C++FLAGS}
  778. CCF=    ${CC} ${CFLAGS}
  779.  
  780. #
  781. # Shell script for generating make dependencies.  MKDEPEND is a shorthand
  782. # for the tool's absolute pathname.  MKDEPENDC adds MKDEPCFLAGS and the -c
  783. # mkdepend option to this.  The other language's mkdepend variables try to
  784. # include their language's name in the variable names.  Unfortunately, a
  785. # lot of makefiles already use the nondescript LMKDEPFLAGS for C language
  786. # mkdepend options, so we initialize LMKDEPCFLAGS with ${LMKDEPFLAGS}.
  787. #
  788. MKDEPENDC++    =${MKDEPEND} ${MKDEPC++FLAGS} -c "${C++F} ${C++FILE} -M"
  789. MKDEPENDC    =${MKDEPEND} ${MKDEPCFLAGS} -c "${CCF} -M"
  790.  
  791. MKDEPC++FLAGS    =${VMKDEPC++FLAGS} ${LMKDEPC++FLAGS} ${GMKDEPC++FLAGS}
  792. MKDEPCFLAGS    =${VMKDEPCFLAGS} ${LMKDEPCFLAGS} ${GMKDEPCFLAGS}
  793. LMKDEPCFLAGS    =${LMKDEPFLAGS}
  794.  
  795. GMKDEPFLAGS    =-e 's@ ${INCLDIR}/@ $${INCLDIR}/@' -e 's@ ${ROOT}/@ $${ROOT}/@'
  796. GMKDEPC++FLAGS    =${GMKDEPFLAGS} -s C++ -e 's@\.c++\.o *: @\.o: @'
  797. GMKDEPCFLAGS    =${GMKDEPFLAGS}
  798.  
  799. #
  800. # Macro to add to LMKDEPCFLAGS or LMKDEPC++FLAGS if your makefile builds
  801. # single-source programs using null suffix rules (e.g., .c:}.  This option
  802. # works for both C and C++ make depend.
  803. #
  804. NULLSUFFIX_MKDEPFLAG=-e 's@\.o+*:@:@'
  805. #
  806. # MKDEPFILE is the name of the dependency database, included by rules.
  807. #
  808. MKDEPFILE=Makedepend
  809. #
  810. # CDEPFILES lists all C or cc-compiled source files that depend on header
  811. # files computable by ${MKDEPENDC}.  C++DEPFILES lists all C++ files having
  812. # dependencies computable by ${MKDEPENDC++}.
  813. #
  814. C++DEPFILES=${C++FILES}
  815. CDEPFILES=${CFILES}
  816. DEPFILES=${C++DEPFILES} ${CDEPFILES}
  817.  
  818. #
  819. # Directory shorthands, mainly for make depend (see GMKDEPFLAGS above).
  820. #
  821. EOF-EOF-EOF
  822. NewFile port/aix32/install.sh<<'EOF-EOF-EOF'
  823. #!/bin/ksh
  824. #    $Header: /usr/people/sam/fax/port/aix32/RCS/install.sh,v 1.1 93/08/26 19:28:41 sam Exp $
  825. #
  826. # FlexFAX Facsimile Software
  827. #
  828. # Copyright (c) 1990, 1991, 1992 Sam Leffler
  829. # Copyright (c) 1991, 1992 Silicon Graphics, Inc.
  830. # Permission to use, copy, modify, distribute, and sell this software and 
  831. # its documentation for any purpose is hereby granted without fee, provided
  832. # that (i) the above copyright notices and this permission notice appear in
  833. # all copies of the software and related documentation, and (ii) the names of
  834. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  835. # publicity relating to the software without the specific, prior written
  836. # permission of Stanford and Silicon Graphics.
  837. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  838. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  839. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  840. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  841. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  842. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  843. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  844. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  845. # OF THIS SOFTWARE.
  846. #
  847.  
  848. #
  849. # Shell script to emulate SGI install program under SunOS.
  850. #
  851. preopts=""
  852. postopts=""
  853. SaveFirst="no";
  854. HasSource="yes"
  855. RemoveFirst=no
  856.  
  857. INSTALL="/usr/ucb/install -c"
  858. CMD=$INSTALL
  859. SRC=""
  860. FILES=""
  861. DESTDIR=""
  862. CHMOD=":"
  863. CHOWN=":"
  864. CHGRP=":"
  865. RM="/bin/rm -f"
  866. MV="/bin/mv -f"
  867. ECHO=":"
  868.  
  869. while [ x"$1" != x"" ]
  870. do
  871.     arg=$1
  872.     case $arg in
  873.     -m)        shift; CHMOD="/bin/chmod $1";;
  874.     -u)        shift; CHOWN="/usr/bin/chown $1";;
  875.     -g)        shift; CHGRP="/usr/bin/chgrp $1";;
  876.     -o)        SaveFirst="yes";;
  877.     -O)        RemoveFirst="yes"; SaveFirst="yes";;
  878.     -root)    shift; ROOT=$1;;
  879.     -dir)    CMD="/bin/mkdir"; HasSource="no";;
  880.     -fifo)    CMD="/usr/bin/mkfifo"; HasSource="no";;
  881.     -ln)    shift; CMD="/bin/ln"; SRC=$1;;
  882.     -lns)    shift; CMD="/bin/ln"; preopts="-s"; SRC=$1;;
  883.     -src)    shift; SRC=$1;;
  884.     -[fF])    shift; DESTDIR=$1;;
  885.     # these are skipped/not handled
  886.     -idb|-new|-rawidb|-blk|-chr) shift;;
  887.     -v)        ECHO="/bin/echo";;
  888.     -*)     ;;
  889.     *)        FILES="$FILES $arg";;
  890.     esac
  891.     shift
  892. done
  893. : set -x
  894. if [ $RemoveFirst = "yes" ]; then
  895.     for f in $FILES
  896.     do
  897.     bf=`basename $f`
  898.     if [ -f $ROOT/$DESTDIR/$bf ]; then
  899.         $ECHO "$RM $ROOT/$DESTDIR/$bf"
  900.         $RM $ROOT/$DESTDIR/$bf
  901.     fi
  902.     done
  903. fi
  904. if [ $SaveFirst = "yes" ]; then
  905.     for f in $FILES
  906.     do
  907.     bf=`basename $f`
  908.     if [ -f $ROOT/$DESTDIR/$bf ]; then
  909.         $ECHO "$MV $ROOT/$DESTDIR/$bf $ROOT/$DESTDIR/OLD$bf"
  910.         $MV $ROOT/$DESTDIR/$bf $ROOT/$DESTDIR/OLD$bf
  911.     fi
  912.     done
  913. fi
  914. for f in $FILES
  915. do
  916.     $ECHO "$RM $ROOT/$DESTDIR/$f"
  917.     $RM $ROOT/$DESTDIR/$f
  918.     if [ "$SRC" = "" -a $HasSource = "yes" ]; then
  919.         $ECHO "$CMD $preopts $f $ROOT/$DESTDIR/$f $postopts"
  920.         $CMD $preopts $f $ROOT/$DESTDIR/$f $postopts
  921.     else
  922.         $ECHO "$CMD $preopts $SRC $ROOT/$DESTDIR/$f $postopts"
  923.         $CMD $preopts $SRC $ROOT/$DESTDIR/$f $postopts
  924.     fi
  925.     $ECHO "$CHOWN $ROOT/$DESTDIR/$f"; $CHOWN $ROOT/$DESTDIR/$f
  926.     $ECHO "$CHGRP $ROOT/$DESTDIR/$f"; $CHGRP $ROOT/$DESTDIR/$f
  927.     $ECHO "$CHMOD $ROOT/$DESTDIR/$f"; $CHMOD $ROOT/$DESTDIR/$f
  928. done
  929. EOF-EOF-EOF
  930. NewFile port/aix32/strcasecmp.c<<'EOF-EOF-EOF'
  931. /*
  932.  * Copyright (c) 1987 Regents of the University of California.
  933.  * All rights reserved.
  934.  *
  935.  * Redistribution and use in source and binary forms are permitted
  936.  * provided that: (1) source distributions retain this entire copyright
  937.  * notice and comment, and (2) distributions including binaries display
  938.  * the following acknowledgement:  ``This product includes software
  939.  * developed by the University of California, Berkeley and its contributors''
  940.  * in the documentation or other materials provided with the distribution
  941.  * and in all advertising materials mentioning features or use of this
  942.  * software. Neither the name of the University nor the names of its
  943.  * contributors may be used to endorse or promote products derived
  944.  * from this software without specific prior written permission.
  945.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  946.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  947.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  948.  */
  949.  
  950. #include <string.h>
  951.  
  952. #if defined(LIBC_SCCS) && !defined(lint)
  953. static const char sccsid[] = "@(#)strcasecmp.c    5.9 (Berkeley) 6/1/90";
  954. #endif /* LIBC_SCCS and not lint */
  955.  
  956. /*
  957.  * This array is designed for mapping upper and lower case letter
  958.  * together for a case independent comparison.  The mappings are
  959.  * based upon ascii character sequences.
  960.  */
  961. static const u_char charmap[] = {
  962.     '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
  963.     '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
  964.     '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
  965.     '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
  966.     '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
  967.     '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
  968.     '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
  969.     '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
  970.     '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
  971.     '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
  972.     '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
  973.     '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
  974.     '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
  975.     '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
  976.     '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
  977.     '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
  978.     '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
  979.     '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
  980.     '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
  981.     '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
  982.     '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
  983.     '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
  984.     '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
  985.     '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
  986.     '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
  987.     '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
  988.     '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
  989.     '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
  990.     '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
  991.     '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
  992.     '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
  993.     '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
  994. };
  995.  
  996. int
  997. strcasecmp(s1, s2)
  998.     const char *s1, *s2;
  999. {
  1000.     register const u_char *cm = charmap,
  1001.             *us1 = (const u_char *)s1,
  1002.             *us2 = (const u_char *)s2;
  1003.  
  1004.     while (cm[*us1] == cm[*us2++])
  1005.         if (*us1++ == '\0')
  1006.             return (0);
  1007.     return (cm[*us1] - cm[*--us2]);
  1008. }
  1009.  
  1010. int
  1011. strncasecmp(s1, s2, n)
  1012.     const char *s1, *s2;
  1013.     register size_t n;
  1014. {
  1015.     if (n != 0) {
  1016.         register const u_char *cm = charmap,
  1017.                 *us1 = (const u_char *)s1,
  1018.                 *us2 = (const u_char *)s2;
  1019.  
  1020.         do {
  1021.             if (cm[*us1] != cm[*us2++])
  1022.                 return (cm[*us1] - cm[*--us2]);
  1023.             if (*us1++ == '\0')
  1024.                 break;
  1025.         } while (--n != 0);
  1026.     }
  1027.     return (0);
  1028. }
  1029. EOF-EOF-EOF
  1030. NewFile port/aix32/vsyslog.c<<'EOF-EOF-EOF'
  1031. #include <stdio.h>
  1032. #include <sys/types.h>
  1033. #include <stdarg.h>
  1034. #include <sys/syslog.h>
  1035.  
  1036. void
  1037. vsyslog(pri, fmt, ap)
  1038.     int pri;
  1039.     register const char *fmt;
  1040.     va_list ap;
  1041. {
  1042.     char tbuf[2048];
  1043.  
  1044.     (void)vsprintf(tbuf, fmt, ap);
  1045.     (void)syslog(pri, tbuf);
  1046.     return;
  1047. }
  1048. EOF-EOF-EOF
  1049. NewDir port/aix32/gcc-related
  1050. NewFile port/aix32/gcc-related/ctype.h<<'EOF-EOF-EOF'
  1051. extern "C" {
  1052. #include_next <ctype.h>
  1053. }
  1054. EOF-EOF-EOF
  1055. NewFile port/aix32/gcc-related/dirent.h<<'EOF-EOF-EOF'
  1056. extern "C" {
  1057. #include_next <dirent.h>
  1058. }
  1059. EOF-EOF-EOF
  1060. NewFile port/aix32/gcc-related/fcntl.h<<'EOF-EOF-EOF'
  1061. extern "C" {
  1062. #define open  Fx_open
  1063. #include_next <fcntl.h>
  1064. #undef  open
  1065. int open(const char *, int, mode_t = 0666);
  1066. }
  1067. EOF-EOF-EOF
  1068. NewFile port/aix32/gcc-related/math.h<<'EOF-EOF-EOF'
  1069. /* (empty file) */
  1070. EOF-EOF-EOF
  1071. NewFile port/aix32/gcc-related/netdb.h<<'EOF-EOF-EOF'
  1072. extern "C" {
  1073. #include_next <netdb.h>
  1074. struct hostent * gethostbyname (const char *);
  1075. struct servent * getservbyname (const char*, const char*);
  1076. }
  1077. EOF-EOF-EOF
  1078. NewFile port/aix32/gcc-related/pwd.h<<'EOF-EOF-EOF'
  1079. extern "C" {
  1080. #include_next <pwd.h>
  1081. }
  1082. EOF-EOF-EOF
  1083. NewFile port/aix32/gcc-related/setjmp.h<<'EOF-EOF-EOF'
  1084. extern "C" {
  1085. #include_next <setjmp.h>
  1086. }
  1087. EOF-EOF-EOF
  1088. NewFile port/aix32/gcc-related/signal.h<<'EOF-EOF-EOF'
  1089. extern "C" {
  1090. #include <sys/types.h>
  1091. #include_next <sys/signal.h>
  1092. int sigpause (int);
  1093. int sigsetmask (int);
  1094. int sigblock (int);
  1095. void (*sigset(int, void (*) (int)))(int);
  1096. int sighold(int);
  1097. int sigrelse(int);
  1098. int sigignore(int);
  1099. #undef SV_INTERRUPT
  1100. }
  1101. EOF-EOF-EOF
  1102. NewFile port/aix32/gcc-related/stdio.h<<'EOF-EOF-EOF'
  1103. extern "C" {
  1104. #define popen Fx_popen
  1105. #define vfprintf Fx_vfprintf
  1106. #define vprintf Fx_vprintf
  1107. #define vsprintf Fx_vsprintf
  1108.  
  1109. #ifdef _VA_LIST
  1110. #define __va_list       va_list
  1111. #else
  1112. typedef char *          __va_list;
  1113. #endif
  1114.  
  1115. #include_next <stdio.h>
  1116.  
  1117. #undef  popen
  1118. #undef  vfprintf
  1119. #undef  vprintf
  1120. #undef  vsprintf
  1121.  
  1122. extern FILE* popen(const char*, const char*);
  1123. extern int _filbuf(FILE*);
  1124. extern int _flsbuf(unsigned char, FILE*);
  1125. extern int vfprintf(FILE *, const char *, __va_list);
  1126. extern int vprintf(const char *, __va_list); 
  1127. extern int vsprintf(char *, const char *, __va_list);
  1128. }
  1129. EOF-EOF-EOF
  1130. NewFile port/aix32/gcc-related/stdlib.h<<'EOF-EOF-EOF'
  1131. extern "C" {
  1132. #define getopt  Fx_getopt
  1133. #include_next <stdlib.h>
  1134. #undef  getopt
  1135. }
  1136. EOF-EOF-EOF
  1137. NewFile port/aix32/gcc-related/string.h<<'EOF-EOF-EOF'
  1138. extern "C" {
  1139. #include <sys/types.h>
  1140. #include <standards.h>
  1141. extern char     *strerror(int errnum);
  1142. extern char     *strchr(const char *s, int c);
  1143. extern int      strncmp(const char *s1,const char *s2,size_t n);
  1144. extern char     *strdup(char *s);
  1145. }
  1146. EOF-EOF-EOF
  1147. NewFile port/aix32/gcc-related/termios.h<<'EOF-EOF-EOF'
  1148. extern "C" {
  1149. #include_next <termios.h>
  1150. }
  1151. EOF-EOF-EOF
  1152. NewFile port/aix32/gcc-related/time.h<<'EOF-EOF-EOF'
  1153. extern "C" {
  1154. #define localtime Fx_localtime
  1155. #include_next <time.h>
  1156. #undef localtime
  1157. }
  1158. EOF-EOF-EOF
  1159. NewFile port/aix32/gcc-related/unistd.h<<'EOF-EOF-EOF'
  1160. #ifndef _H_UNISTD
  1161.  
  1162. extern "C" {
  1163. #include <sys/stat.h>
  1164. #include <fcntl.h>
  1165. #include <signal.h>
  1166.  
  1167. /* avoid clash with (identical, but differing in whitespace) definitions in stdio.h (some macro-preprocessors are whitespace sensitive) */
  1168. #ifdef SEEK_SET
  1169. #undef SEEK_SET
  1170. #endif
  1171. #ifdef SEEK_CUR
  1172. #undef SEEK_CUR
  1173. #endif
  1174. #ifdef SEEK_END
  1175. #undef SEEK_END
  1176. #endif
  1177.  
  1178. // Override these definitions in /usr/include/unistd.h
  1179. #define chdir  Fx_chdir
  1180. #define execve Fx_execve
  1181. #define execvp Fx_execvp
  1182. #define getcwd Fx_getcwd
  1183. #define read   Fx_read
  1184. #define write  Fx_write
  1185.  
  1186. // Avoid clashes with C++ operator new
  1187. #define new    Fx_new
  1188.  
  1189. #include_next <unistd.h>
  1190.  
  1191. #undef chdir
  1192. #undef execve
  1193. #undef execvp
  1194. #undef getcwd
  1195. #undef read   
  1196. #undef write
  1197.  
  1198. #undef new
  1199. #ifdef NULL
  1200. #undef NULL
  1201. #define NULL 0
  1202. #endif
  1203.  
  1204. int chdir(const char*);
  1205. int execve(const char*, const char*[], const char*[]);
  1206. int execvp(const char*, const char*[]);
  1207. char *getcwd(const char *, int);
  1208. int read(int, void*, unsigned);
  1209. int write(int, const void*, unsigned);
  1210.  
  1211. // Add these functions - somehow they are missing from /usr/include/unistd.h
  1212. int acct(const char*);
  1213. int brk(char*);
  1214. int chroot(const char*);
  1215. int closepl();
  1216. char *getwd(char *);
  1217. int ioctl(int, int ...);
  1218. int lockf(int, int, off_t);
  1219. int mknod(const char*, int, int);
  1220. int mount(const char*, const char*, int);
  1221. int nice(int);
  1222. int openpl();
  1223. int plock(int);
  1224. void profil(const char*, int, int, int);
  1225. int ptrace(int, int, int, int);
  1226. int rmount(const char *,const char *, const char *, int);
  1227. char *sbrk(int);
  1228. int setpgrp();
  1229. int stime(const long*);
  1230. void sync();
  1231. void sys3b(int, int ...);
  1232. int umount(const char*);
  1233. int vfork(void); 
  1234.  
  1235. int system(const char*);
  1236. int kill(pid_t, int);
  1237.  
  1238. int accessx(const char *, int, int);
  1239. int faccessx(int, int, int);
  1240.  
  1241. }
  1242. #endif
  1243. EOF-EOF-EOF
  1244. NewDir port/aix32/gcc-related/sys
  1245. NewFile port/aix32/gcc-related/sys/fcntl.h<<'EOF-EOF-EOF'
  1246. extern "C" {
  1247. #define open  Fx_open
  1248. #include_next <fcntl.h>
  1249. #undef  open
  1250. #undef  creat
  1251. int open(const char *, int, mode_t = 0666);
  1252. }
  1253. EOF-EOF-EOF
  1254. NewFile port/aix32/gcc-related/sys/select.h<<'EOF-EOF-EOF'
  1255. extern "C" {
  1256. #include_next <sys/select.h>
  1257. }
  1258. EOF-EOF-EOF
  1259. NewFile port/aix32/gcc-related/sys/stat.h<<'EOF-EOF-EOF'
  1260. extern "C" {
  1261. #define fchmod Fx_fchmod
  1262. #define fchown Fx_fchown
  1263. #include_next <sys/stat.h>
  1264. #undef fchmod
  1265. #undef fchown
  1266. int      fstat(int fildes, struct stat *);
  1267. }
  1268. EOF-EOF-EOF
  1269. NewFile port/aix32/gcc-related/sys/time.h<<'EOF-EOF-EOF'
  1270. extern "C" {
  1271. #include_next <sys/time.h>
  1272. int gettimeofday(struct timeval*, struct timezone*);
  1273. int settimeofday(struct timeval*, struct timezone*);
  1274. int usleep (unsigned int);
  1275. struct itimerval;
  1276. int setitimer (int, itimerval*, itimerval*);
  1277. int getitimer (int, itimerval*);
  1278. }
  1279. EOF-EOF-EOF
  1280. NewFile port/aix32/gcc-related/sys/wait.h<<'EOF-EOF-EOF'
  1281. extern "C" {
  1282. #define wait3    Fx_wait3
  1283. #include_next <sys/wait.h>
  1284. #undef wait3
  1285. }
  1286. EOF-EOF-EOF
  1287. Patch port/bsdi/defs<<'EOF-EOF-EOF'
  1288. 1c1
  1289. < #    $Header: /usr/people/sam/fax/port/bsdi/RCS/defs,v 1.24 93/08/13 15:16:09 sam Exp $
  1290. ---
  1291. > #    $Header: /usr/people/sam/fax/port/bsdi/RCS/defs,v 1.26 93/08/17 18:20:46 sam Exp $
  1292. 117c117
  1293. < MACHDEPLIBS=-lg++ -liberty
  1294. ---
  1295. > MACHDEPLIBS=-lg++
  1296. 226c226
  1297. < GCDEFS=
  1298. ---
  1299. > GCDEFS=-DSIGCLD=SIGCHLD
  1300. 243c243
  1301. < GC++DEFS=-DfxSIGHANDLER=sig_t '-DfxSIGVECHANDLER=(void(*)())'
  1302. ---
  1303. > GC++DEFS=-DfxSIGHANDLER=sig_t '-DfxSIGVECHANDLER=(void(*)())' -DSIGCLD=SIGCHLD
  1304. EOF-EOF-EOF
  1305. Patch port/linux/defs<<'EOF-EOF-EOF'
  1306. 1c1
  1307. < #    $Header: /usr/people/sam/fax/port/linux/RCS/defs,v 1.3 93/08/13 15:16:17 sam Exp $
  1308. ---
  1309. > #    $Header: /usr/people/sam/fax/port/linux/RCS/defs,v 1.4 93/08/17 11:30:05 sam Exp $
  1310. 123c123
  1311. < MACHDEPLIBS=-lg++ #-liberty
  1312. ---
  1313. > MACHDEPLIBS=-lg++
  1314. EOF-EOF-EOF
  1315. Patch port/sco/defs<<'EOF-EOF-EOF'
  1316. 1c1
  1317. < #    $Header: /usr/people/sam/fax/port/sco/RCS/defs,v 1.7 93/08/13 15:16:20 sam Exp $
  1318. ---
  1319. > #    $Header: /usr/people/sam/fax/port/sco/RCS/defs,v 1.8 93/08/17 11:30:10 sam Exp $
  1320. 116c116
  1321. < MACHDEPLIBS=-lg++ -liberty -lsocket -lc -lm -lintl -lx
  1322. ---
  1323. > MACHDEPLIBS=-lg++ -lsocket -lc -lm -lintl -lx
  1324. EOF-EOF-EOF
  1325. Patch port/sgi/defs.gcc<<'EOF-EOF-EOF'
  1326. 1c1
  1327. < #    $Header: /usr/people/sam/fax/port/sgi/RCS/defs.gcc,v 1.11 93/08/13 15:16:22 sam Exp $
  1328. ---
  1329. > #    $Header: /usr/people/sam/fax/port/sgi/RCS/defs.gcc,v 1.12 93/08/17 11:30:22 sam Exp $
  1330. 117c117
  1331. < MACHDEPLIBS=-lmalloc -lsun -lg++ -liberty
  1332. ---
  1333. > MACHDEPLIBS=-lmalloc -lsun -lg++
  1334. EOF-EOF-EOF
  1335. Patch port/solaris2/defs<<'EOF-EOF-EOF'
  1336. 1c1
  1337. < #    $Header: /usr/people/sam/fax/port/solaris2/RCS/defs,v 1.9 93/08/13 15:16:23 sam Exp $
  1338. ---
  1339. > #    $Header: /usr/people/sam/fax/port/solaris2/RCS/defs,v 1.10 93/08/17 11:30:11 sam Exp $
  1340. 119c119
  1341. < MACHDEPLIBS=-lg++ -liberty -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
  1342. ---
  1343. > MACHDEPLIBS=-lg++ -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
  1344. EOF-EOF-EOF
  1345. Patch port/sun/defs<<'EOF-EOF-EOF'
  1346. 1c1
  1347. < #    $Header: /usr/people/sam/fax/port/sun/RCS/defs,v 1.30 93/08/13 15:16:24 sam Exp $
  1348. ---
  1349. > #    $Header: /usr/people/sam/fax/port/sun/RCS/defs,v 1.31 93/08/17 11:30:14 sam Exp $
  1350. 111c111
  1351. < MACHDEPLIBS=-lg++ -liberty
  1352. ---
  1353. > MACHDEPLIBS=-lg++
  1354. EOF-EOF-EOF
  1355. Patch port/svr4/defs<<'EOF-EOF-EOF'
  1356. 1c1
  1357. < #    $Header: /usr/people/sam/fax/port/svr4/RCS/defs,v 1.14 93/08/13 15:16:25 sam Exp $
  1358. ---
  1359. > #    $Header: /usr/people/sam/fax/port/svr4/RCS/defs,v 1.15 93/08/17 11:30:16 sam Exp $
  1360. 118c118
  1361. < MACHDEPLIBS=-lg++ -liberty -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
  1362. ---
  1363. > MACHDEPLIBS=-lg++ -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
  1364. EOF-EOF-EOF
  1365. Patch recvfax/jobs.c<<'EOF-EOF-EOF'
  1366. 1c1
  1367. < /*    $Header: /usr/people/sam/fax/recvfax/RCS/jobs.c,v 1.21 93/08/14 19:51:31 sam Exp $
  1368. ---
  1369. > /*    $Header: /usr/people/sam/fax/recvfax/RCS/jobs.c,v 1.22 93/08/27 14:05:24 sam Exp $
  1370. 154a155,182
  1371. > static int
  1372. > checkUser(const char* requestor, struct passwd* pwd)
  1373. > {
  1374. >     char buf[1024];
  1375. >     char* cp;
  1376. >     buf[0] = '\0';
  1377. >     if (pwd->pw_gecos) {
  1378. >     if (pwd->pw_gecos[0] == '&') {
  1379. >         strcpy(buf, pwd->pw_name);
  1380. >         strcat(buf, pwd->pw_gecos+1);
  1381. >         if (islower(buf[0]))
  1382. >         buf[0] = toupper(buf[0]);
  1383. >     } else
  1384. >         strcpy(buf, pwd->pw_gecos);
  1385. >     if ((cp = strchr(buf,',')) != 0)
  1386. >         *cp = '\0';
  1387. >     } else
  1388. >     strcpy(buf, pwd->pw_name);
  1389. >     if (debug) {
  1390. >     if (*buf)
  1391. >          syslog(LOG_DEBUG, "%s user: \"%s\"", pwd->pw_name, buf);
  1392. >     else
  1393. >          syslog(LOG_DEBUG, "name of %s user unknown", pwd->pw_name);
  1394. >     }
  1395. >     return (strcmp(requestor, buf) == 0);
  1396. > }
  1397. 159,161d186
  1398. <     struct passwd* pwd = NULL;
  1399. <     char buf[1024];
  1400. <     char* cp;
  1401. 184c209
  1402. <     return;            /* nothing to do */
  1403. ---
  1404. >     return;
  1405. 186,194c211,220
  1406. <     if (strcmp(requestor, (*job)->sender) == 0) {
  1407. <     /* alter job parameters */
  1408. <     if (debug)
  1409. <         syslog(LOG_DEBUG, "%s request by owner for %s", op, tag);
  1410. <     (*f)(*job, tag, arg);
  1411. <     if ((*job)->flags & JOB_INVALID)
  1412. <         *job = (*job)->next;
  1413. <     return;            /* nothing to do */
  1414. <     }
  1415. ---
  1416. >     /*
  1417. >      * Validate requestor is permitted to do op to the
  1418. >      * requested job.  We permit the person that submitted
  1419. >      * the job, the fax user, and root.  Using the GECOS
  1420. >      * field in doing the comparison is a crock, but not
  1421. >      * something to change now--leave it for a protocol
  1422. >      * redesign.
  1423. >      */
  1424. >     if (strcmp(requestor, (*job)->sender) != 0) {    /* not the sender */
  1425. >     struct passwd* pwd = getpwuid(getuid());
  1426. 196,200c222,243
  1427. <     buf[0] = '\0';
  1428. <     pwd = getpwuid(getuid());
  1429. <     if (!pwd) {
  1430. <     syslog(LOG_ERR, "getpwuid failed for uid %d: %m", getuid());
  1431. <     pwd = getpwuid(geteuid());
  1432. ---
  1433. >     if (!pwd) {
  1434. >         syslog(LOG_ERR, "getpwuid failed for uid %d: %m", getuid());
  1435. >         pwd = getpwuid(geteuid());
  1436. >     }
  1437. >     if (!pwd) {
  1438. >         syslog(LOG_ERR, "getpwuid failed for effective uid %d: %m",
  1439. >         geteuid());
  1440. >         sendClient("sOwner", "%s", tag);
  1441. >         return;
  1442. >     }
  1443. >     if (!checkUser(requestor, pwd)) {        /* not fax user */
  1444. >         pwd = getpwnam("root");
  1445. >         if (!pwd) {
  1446. >         syslog(LOG_ERR, "getpwnam failed for \"root\": %m");
  1447. >         sendClient("sOwner", "%s", tag);
  1448. >         return;
  1449. >         }
  1450. >         if (!checkUser(requestor, pwd)) {        /* not root user */
  1451. >         sendClient("jobOwner", "%s", tag);
  1452. >         return;
  1453. >         }
  1454. >     }
  1455. 202,230c245,249
  1456. <     if (!pwd) {
  1457. <     syslog(LOG_ERR, "getpwuid failed for effective uid %d: %m", geteuid());
  1458. <     sendClient("sOwner", "%s", tag);
  1459. <     } else {
  1460. <     if (pwd->pw_gecos) {
  1461. <         if (pwd->pw_gecos[0] == '&') {
  1462. <         strcpy(buf, pwd->pw_name);
  1463. <         strcat(buf, pwd->pw_gecos+1);
  1464. <         if (islower(buf[0]))
  1465. <             buf[0] = toupper(buf[0]);
  1466. <         } else
  1467. <         strcpy(buf, pwd->pw_gecos);
  1468. <         if ((cp = strchr(buf,',')) != 0)
  1469. <         *cp = '\0';
  1470. <     } else
  1471. <         strcpy(buf, pwd->pw_name);
  1472. <     }
  1473. <     if (debug) {
  1474. <     if (*buf)
  1475. <          syslog(LOG_DEBUG, "fax user: \"%s\"", buf);
  1476. <     else
  1477. <          syslog(LOG_DEBUG, "name of fax user unknown");
  1478. <     }
  1479. <     if (strcmp(requestor, buf) == 0) {
  1480. <     (*f)(*job, tag, arg);
  1481. <     if ((*job)->flags & JOB_INVALID)
  1482. <         *job = (*job)->next;
  1483. <     } else
  1484. <     sendClient("jobOwner", "%s", tag);
  1485. ---
  1486. >     if (debug)
  1487. >     syslog(LOG_DEBUG, "%s request by %s for %s", op, requestor, tag);
  1488. >     (*f)(*job, tag, arg);
  1489. >     if ((*job)->flags & JOB_INVALID)
  1490. >     *job = (*job)->next;
  1491. EOF-EOF-EOF
  1492. Patch sendfax/sendfax.c++<<'EOF-EOF-EOF'
  1493. 1c1
  1494. < /*    $Header: /usr/people/sam/fax/sendfax/RCS/sendfax.c++,v 1.56 93/08/15 11:24:09 sam Exp $
  1495. ---
  1496. > /*    $Header: /usr/people/sam/fax/sendfax/RCS/sendfax.c++,v 1.57 93/08/27 14:01:48 sam Exp $
  1497. 258c258
  1498. <     int fd = mkstemp(tmpl);
  1499. ---
  1500. >     int fd = mkstemp((char*) tmpl);
  1501. EOF-EOF-EOF
  1502. Patch util/FaxClient.c++<<'EOF-EOF-EOF'
  1503. 1c1
  1504. < /*    $Header: /usr/people/sam/fax/util/RCS/FaxClient.c++,v 1.30 93/08/16 08:19:05 sam Exp $
  1505. ---
  1506. > /*    $Header: /usr/people/sam/fax/util/RCS/FaxClient.c++,v 1.31 93/08/27 14:05:51 sam Exp $
  1507. 165c165
  1508. <     fxFatal("%s: Unknown host.", (char*) host);
  1509. ---
  1510. >     fxFatal("%s: Unknown host", (char*) host);
  1511. EOF-EOF-EOF
  1512. Patch util/SendFaxClient.c++<<'EOF-EOF-EOF'
  1513. 1c1
  1514. < /*    $Header: /usr/people/sam/fax/util/RCS/SendFaxClient.c++,v 1.13 93/08/15 11:22:38 sam Exp $
  1515. ---
  1516. > /*    $Header: /usr/people/sam/fax/util/RCS/SendFaxClient.c++,v 1.14 93/08/27 14:01:49 sam Exp $
  1517. 519c519
  1518. <     int fd = mkstemp(templ);
  1519. ---
  1520. >     int fd = mkstemp((char*) templ);
  1521. EOF-EOF-EOF
  1522. Patch util/textfmt.c++<<'EOF-EOF-EOF'
  1523. 1c1
  1524. < /*    $Header: /usr/people/sam/fax/util/RCS/textfmt.c++,v 1.20 93/08/15 11:22:41 sam Exp $
  1525. ---
  1526. > /*    $Header: /usr/people/sam/fax/util/RCS/textfmt.c++,v 1.22 93/08/20 17:51:40 sam Exp $
  1527. 89a90
  1528. > fxBool    bop;            // at beginning of a page
  1529. 559a561
  1530. >     bop = TRUE;
  1531. 600c602
  1532. <     beginCol(), boc = FALSE;
  1533. ---
  1534. >     beginCol(), boc = FALSE, bop = FALSE;
  1535. 722,723c724,727
  1536. <     column = numcol;            // force page end action
  1537. <     endTextCol();
  1538. ---
  1539. >     if (!bop) {
  1540. >     column = numcol;            // force page end action
  1541. >     endTextCol();
  1542. >     }
  1543. 743c747
  1544. <     closepath stroke\
  1545. ---
  1546. >     closepath stroke \
  1547. EOF-EOF-EOF
  1548.